﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmallERP.MODEL.FoundationModel;
using Smallerp.Contracts.DataContracts;

namespace SmallERP.PinBan.PB.Presenter
{
    /// <summary>
    /// 各页面之前的数据传输中转类
    /// </summary>
    public class DataTransfer
    {
        /// <summary>
        /// 远程地址
        /// </summary>
        public static string Addr { get; set; }

        /// <summary>
        /// Port口
        /// </summary>
        public static int Port { get; set; }

        public static List<PrinterDCT> AllPrinterList;
        /// <summary>
        /// 该打印机机的所有模板列表
        /// </summary>
        public static List<BoardTemplate_DCT> BoardTempalteList;
        /// <summary>
        /// //25个相素点宽度的条码，以254DPI的打印机算，约等于0.1英寸，按照系统1inch=10个屏点算，所以此处约等于1个屏点
        /// </summary>
        public static readonly int BarCodePixWidth = 1;
        /// <summary>
        /// //新建纸时的每一英寸在电脑屏上等于多少个相素点;
        /// </summary>
        public static int PERPIXEL = 10;
        /// <summary>
        /// //是否显示图片
        /// </summary>
        public static bool IsShowImg = false;
        public static string IPadress { get; set; }

        /// <summary>
        /// 当前拼板的打印机信息
        /// </summary>
        public static PrinterDCT CurPrinerInfo;

        /// <summary>
        /// 当前选中的模板
        /// </summary>
        public static BoardTemplate_DCT curTemplateInfo;
        /// <summary>
        /// 新建大板的高度，单位：屏幕上的像素
        /// </summary>
        public static int ScreenBoardHeight { get { return Convert.ToInt32(curTemplateInfo.Height * PERPIXEL); } }
        /// <summary>
        ///  //宽度，单位:屏幕上的像素,也是红线的位置
        /// </summary>
        public static int ScreenBoardLength { get { return Convert.ToInt32(curTemplateInfo.Length * PERPIXEL); } }
        /// <summary>
        ///  //像素为单位的
        /// </summary>
        public static readonly int BarCodePixFactWidth = 30;




       
    }
}
